API Documentation
Public Member Functions | List of all members
nkInputs::MouseDeviceManager Class Referencefinal

Manages the mouse devices available in the component. More...

Inheritance diagram for nkInputs::MouseDeviceManager:

Public Member Functions

MouseDeviceManagercreateOrRetrieve (const nkMemory::StringView &name)
 
MouseDeviceManagerget (const nkMemory::StringView &name)
 
void rename (const nkMemory::StringView &currentName, const nkMemory::StringView &newName)
 
void erase (const nkMemory::StringView &name)
 

Detailed Description

Manages the mouse devices available in the component.

At all times, manager owns any memory allocated inside. External code should never delete memory returned by it.

Member Function Documentation

◆ createOrRetrieve()

MouseDeviceManager* nkInputs::MouseDeviceManager::createOrRetrieve ( const nkMemory::StringView name)

Creates if unavailable, or retrieves if available, a mouse device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested, possibly freshly created. The manager owns the memory returned, external code should never delete it. See erase().

◆ get()

MouseDeviceManager* nkInputs::MouseDeviceManager::get ( const nkMemory::StringView name)

Retrieves a mouse device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested if available, nullptr else.

◆ rename()

void nkInputs::MouseDeviceManager::rename ( const nkMemory::StringView currentName,
const nkMemory::StringView newName 
)

Renames a mouse device.

Parameters
currentNameThe name of the device to rename.
newNameThe name to reassign to the device.

◆ erase()

void nkInputs::MouseDeviceManager::erase ( const nkMemory::StringView name)

Erases and frees a mouse device.

Parameters
nameThe name of the device to erase.

The documentation for this class was generated from the following file: